#ifndef KCLOCKTIMER_H
#define KCLOCKTIMER_H

#include "../screencapsdk_global.h"
#include <QWidget>

namespace kdk {

class KClockTimerPrivate;

/**
 * @defgroup timerModule
 * @since 2.5
 */
class SCREENCAPSDK_EXPORT KClockTimer :public QWidget
{
    Q_OBJECT
public:
    KClockTimer(QWidget * parent = nullptr);

    /**
     * @brief 获取当前时间
     * @return
     */
    QString time();

public slots:
    /**
     * @brief 开始计时信号
     */
    void startStopwatch();

    /**
     * @brief 停止计时信号
     */
    void stopStopwatch();

    /**
     * @brief 复位信号
     */
    void resetStopwatch();

private:
    KClockTimerPrivate* const d_ptr;
    Q_DECLARE_PRIVATE(KClockTimer)

};

}
#endif // KCLOCKTIMER_H
